<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>Promise testDemo</title>
	<style type="text/css">
	* {
		padding: 0;
		margin: 0;
	}
	 
</style>
</head>
<body>
	<h1>aaaa</h1>
	<div id="box">
	    <h2>第九章 闭包与作用域</h2>
	    <button>收藏课程</button>
	  </div>
</body>
<script src="index.js"></script>
<script type="text/javascript"> 
async function sleep(ms = 2000) {
  return new Promise(resolve => {
    setTimeout(()=> {
      resolve('sdfsdf')
    }, ms);
  });
}
async function run() {
  for (const value of ["后盾人", "向军"]) {
    let ret = await sleep();
    console.log(ret);
    console.log(value);
  }
}
run();

</script>
</html>